package com.example.zyh.mapper;


import com.example.zyh.pojo.Loudong;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LdMapper {
    @Select("select * from loudong")
    public List<Loudong> select();
    @Insert("INSERT INTO loudong (`location`, `lno`, `lnumber`, `total`, `note`)VALUES(#{location}, #{lno},#{lnumber},#{total},#{note})")
    public void addLd(Loudong loudong);
    @Delete("DELETE FROM loudong WHERE `id` =#{id}")
    public void delete(int id);
    @Update("update loudong set  `location` = #{location} , `lno` = #{lno} , `lnumber` = #{lnumber} ," +
            " `total` =#{total} , `note` = #{note} where `id` = #{id} ;\n")
    public void update(Loudong loudong);

    @Select("SELECT * FROM loudong where location=#{location} or lno=#{lno}")
    public List<Loudong> selectlike(Loudong loudong);
}
